﻿using System;
namespace DevToolBox.Common
{
    /// <summary>
    /// Interface for logging messages
    /// </summary>
    public interface ILogger
    {
        
        /// <summary>
        /// Function to write log messages and filter if the messageId meets a given condition vaidated in the
        /// upper (LoggerFacade) class
        /// </summary>
        /// <param name="source">Function writing the message</param>
        /// <param name="message">Message to be written</param>
        /// <param name="color">Priority (Red: error, Yellow: expected error/condition and Green: normal operation) </param>
        /// <param name="contextData">ID's or unique keys related with the message (but not part of the message itself)</param>
        /// <param name="messageId">ID relevant to the current message, used to fo filtering of the current message</param>               
        void Write(string source, string message, ConsoleColor color, int messageId, string contextData = null);

        /// <summary>
        /// Function to write log messages and set the end time (must be called after SetStart)
        /// </summary>
        /// <param name="source">Function writing the message</param>
        /// <param name="message">Message to be written</param>
        /// <param name="color">Priority (Red: error, Yellow: expected error/condition and Green: normal operation) </param>
        void WriteTimeElapsed(string source, ConsoleColor color);
    }
}
